package com.java.web.dwr;

import java.util.ArrayList;
import java.util.List;

import com.java.web.util.CommonUtils;

public class DwrAction {
	
	public String getCurrentTime(){
		return "当前时间："+CommonUtils.getCuttentTime();
	}
	
	public String say(String msg){
		return "你好，“"+msg+"”，我是dwr！";
	}
	
	public User getUser(){
		User user=new User();
		user.setId(1);  
	    user.setName("依韵");  
	    user.setSex("男");  
	    user.setAddress("北京市"); 
	    return user;
	}
	
	public List<User>getUserList(){
		List<User>list=new ArrayList<User>();
		for(int i=0;i<5;i++){  
		    User user = new User();  
		    user.setId(i);  
		    user.setName("依韵"+i);  
		    user.setSex("男");  
		    user.setAddress("北京市");  
		    list.add(user);  
		  }  
		return list;
	}

}
